<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #outer{
            position: absolute;
            display: none;/* 此元素不会被显示 */
        }
    </style>
</head>
<body>
    <div id="outer">
        <img src="../imgs/我老婆.webp" width="150px">
    </div>
    <script>
        let outer = document.getElementById("outer");
        //鼠标移动
        document.onmousemove=function(event){
            outer.style.display="block";/* 此元素设置为块元素 */
            let e = event || window.event;
            
            outer.style.left=e.clientX+'px';
            outer.style.top=e.clientY+'px';
        }
    </script>
</body>
</html>